package front

import (
	"hft/Database/admin"
	"hft/Http/Models/response"
)

// 楼盘相册
type Swipe struct {
	CategoryID   int    `json:"category_id"`
	CategoryName string `json:"category_name"`
	ID           int    `json:"id"`
	LouID        int    `json:"lou_id"`
	GoUrl        string `json:"go_url"`
	Title        string `json:"title"`
	Cover        string `json:"cover"`
	Url          string `json:"url"`
}

type RoomSwipe struct {
	ID           int    `json:"id"`
	Category     int    `json:"category_id" gorm:"comment:轮播图类型;"`
	Cover        string `json:"cover" gorm:"type:text"`
	CategoryName string `json:"category_name,omitempty"`
	LouPanId     int    `json:"louPanId,omitempty"`
	RoomName     string `json:"roomName"`
	RoomID       int    `json:"roomId"`
	Url          string `json:"url" gorm:"type:text" gorm:"comment:地址"`
	GoUrl        string `json:"go_url"`
}

type AroundLou struct {
	ID             uint   `json:"id"`
	Name           string `json:"name"`
	Cover          string `json:"cover"`
	ReferencePrice int    `json:"reference_price"`
	Status         int    `json:"status"`
	MaxArea        int    `json:"max_area"`
	MinArea        int    `json:"min_area"`
	RoomType       []int  `json:"room_type,omitempty"`
	Distance       int    `json:"distance"`
	Center         string `json:"center"`
}

type AroundSearchLou struct {
	admin.LouPan
	DistanceInMeters float32 `gorm:"column:distance_in_meters"`
}

type RoomList struct {
	Name           string `json:"name"`
	Cover          string `json:"cover"`
	Status         int    `json:"status"`
	Area           int    `json:"area"`
	ReferencePrice int    `json:"reference_price"`
	FirstPay       int    `json:"first_pay"`
	RoomPayType    int    `json:"room_pay_type"`
	ForWord        int    `json:"for_word" gorm:"column:forward"`
	ID             int    `json:"id"`
	RoomID         int    `json:"room_id"`
}

type RoomInfo struct {
	LouPanID       int                  `json:"lou_pan_id"`
	SwipeList      []*RoomSwipe         `json:"swipe_list" gorm:"-"`
	Name           string               `json:"name"`
	Status         int                  `json:"status"`
	ReferencePrice int                  `json:"reference_price"`
	RoomID         int                  `json:"room_id"`
	Toward         int                  `json:"toward" gorm:"column:forward"`
	Area           int                  `json:"area"`
	LouName        string               `json:"lou_name"`
	RoomPayType    int                  `json:"room_pay_type"`
	FirstPay       int                  `json:"first_pay"`
	Phone          string               `json:"phone" gorm:"column:sell_phone"`
	RoomList       []*response.RoomList `json:"room_list" gorm:"-"`
}

// 猜你喜欢
type PriceAndArea struct {
	PriceLou []*response.Lou `json:"price_lou"`
	AreaLou  []*response.Lou `json:"area_lou"`
}
